import {
  get,
  post,
  getmh
} from '@/utils/axios.js'
var api = '/api/v1'
var wsApi = '/ws/v1'

// 政务绑定用户
export function saveWechatUser(data) {
  return post(wsApi + `/WechatUser/save`, data)
}

// 获取获取字典数据项
export function getDictDataList(data) {
  return getmh(api + '/dictData/getDictDataByDictId', data)
}
// 获取屏南搜索条件字典表
export function getSearchDic(data) {
  return get(`${api}/dictionary/findByDictionaryCode`, data)
}

// 根据上级区域编码获取列表
export function findByParentCode(data) {
  return get(api + '/region/findByParentCode', data)
}

// =================================== 公示 ===================================
// 获取公示列表
export function getNoticeList(data) {
  return get(wsApi + '/bulidCaseHandler/page', data)
}

// 获取公示详情
export function getNoticeDetail(id) {
  return get(wsApi + `/bulidCaseHandler/village/public/${id}`)
}

// 新增公示异议
export function saveDissent(data) {
  return post(wsApi + `/publicDissent/save`, data)
}

// =================================== 申请记录 ===================================
// 建房申请记录
export function getBuildApplyNotice(data) {
  return get(wsApi + '/buildApplyBase/page', data)
}
// 开工申请记录
export function getStartApplyNotice(data) {
  return get(wsApi + '/loitBuildStartApply/findRecordPage', data)
}
// 竣工申请记录
export function getFinishApplyNotice(data) {
  return get(wsApi + '/buildCompletedApply/page', data)
}
// 建房申请记录详情
export function getBuildApplyDetail(id) {
  return get(wsApi + `/buildApplyBase/${id}`)
}
// 开工申请记录详情
export function getStartApplyDetail(id) {
  return get(wsApi + `/loitBuildStartApply/select/build/record/${id}`)
}
// 竣工申请记录详情
export function getFinishApplyDetail(id) {
  return get(wsApi + `/buildCompletedApply/select/completed/${id}`)
}